package jgl.vajra.operator.part.order.model;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import jgl.vajra.operator.bean.MachineGuyBean;
import jgl.vajra.operator.part.order.contract.ReplaceDriverContract;
import jgl.vajra.operator.widget.manager.RxJavaHttpManager;
import jgl.vajra.operator.widget.manager.retrofit.RetrofitJsonManager;

public class ReplaceDriverModel extends ReplaceDriverContract.Model{
    @Override
    public Observable<List<MachineGuyBean>> getMachineGuyData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getMachineGuyData(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }

    @Override
    public Observable<String> replaceDriver(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().replaceDriver(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }
}
